import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 基础样式
import './styles/reset.less'
import './styles/common.less'
import './styles/page.less'
// icon组件
import './components/icon/index'
// import './components/index'
import '@/components'
import '@/utils/plugin'
// import '@/utils/fastClick'
import filters from './filters'
import '@/utils/vant'
import '@/utils/jsBridge'
import '@/utils/native'
import alert from '@/utils/alert'
import '@/directive/swipe'
import '@/permission'
import 'mobile-drag-drop/default.css';
import { polyfill } from 'mobile-drag-drop';

// 可选引入滚动行为的脚本
import { scrollBehaviourDragImageTranslateOverride } from 'mobile-drag-drop/scroll-behaviour';

// 可选的配置项
const options = {
  // 使用这个选项以应用滚动行为
  dragImageTranslateOverride: scrollBehaviourDragImageTranslateOverride
};

// 初始化polyfill
polyfill(options);

// 调试面板
// import vConsole from 'vconsole'
// // 仅开发环境生效
// // if (process.env.NODE_ENV !== 'production') {
// //   window.vConsole = new vConsole()
// // }
// window.vConsole = new vConsole()
import mixins from './mixins'
Vue.prototype.$alert = alert
// 注入全局过滤器
Object.keys(filters).forEach(item => {
  Vue.filter(item, filters[item])
})
Vue.mixin(mixins)
Vue.config.productionTip = false

export default new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
